<template>
  <div class="process-toolbar">
    <el-button type="primary" @click="handleSave">保存</el-button>
    <el-button @click="handleExport">导出</el-button>
    <el-button type="primary" @click="importGraphJSON">一键复原</el-button>
    <el-button type="info" @click="handleFitToContent">自适应画布</el-button>
  </div>
</template>

<script setup>

// 定义事件
const emit = defineEmits(["save", "export","import", "fitToContent"]);

// 保存流程
const handleSave = () => {
  emit("save");
};

// 导出流程
const handleExport = () => {
  emit("export");
};
// 导入流程
const importGraphJSON = () => {
  emit("import");
};
// 自适应画布
const handleFitToContent = () => {
  emit("fitToContent");
};
</script>

<style lang="scss" scoped>
.process-toolbar {
  padding: 8px 16px;
  border-bottom: 1px solid #dcdfe6;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
</style>